package org.freeswitch.esl.client.test;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "fs")
@Data
@Component
public class FsProperties {
    public static final String EVENT_URL = "callin";
    /**
     * 4.0事件回调地址
     */
    public static final String EVENT_URL_NEW = "event";
    public static final String CALLLIST_URL = "calllist/record";
    public static final String USERS = "users";
    public static final String NEW_CALLIN_NOTICE = "new/callin/notice";
    private String blacklist;
    /**
     * 中继号码，外呼时的中继号码
     */
    private String switchboardNumber;
    /**
     * 呼叫中心中继号码，呼入时的中继号码
     */
    private String switchboardNumberByCc;
    private int heartbeatExpire;
    /**
     * 响应超时，单位秒
     */
    private int responseTimeout;

    private int poolInitSize;
    private int poolMaxActive;
    private int poolApplySize;
    private int eventPoolSize;
    private String mobPrefix;
    private String bizPushUrl;
    private String bizPushUrlNew;

    private int eventMaximumPoolSize;
    private int eventCorePoolSize;
    private long eventKeepAliveTime;
    private int eventQueueCapacity;

    private String recordFileUrl;
    private String recordFileDir;
    private boolean local;
    private boolean retryAble;
    private int retryNumber;
    private Fs normal;
    private Fs voice;
    public static Fs voiceFs;

    @Data
    public static class Fs {
        private String host;
        private int port;
        private String password;
        private int timeout;
        private String gateway;
        private boolean voiceFsIsSend;
    }

    public void setVoice(Fs voice) {
        this.voice = voiceFs = voice;
    }
}
